package com.campus.controller;

import com.campus.pojo.entity.CuisineType;
import com.campus.pojo.entity.Lab;
import com.campus.result.Result;
import com.campus.service.CuisineTypeService;
import com.campus.service.LabService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/cuisineType")
@Slf4j
public class CuisineTypeController {
    @Autowired
    private CuisineTypeService cuisineTypeService;

    /**
     * 查询所有菜系
     */
    @GetMapping("/getCuisineTypeList")
    public Result<List<CuisineType>> getCuisineTypeList() {
        log.info("查询所有菜系");
        List<CuisineType> cuisineTypeList = cuisineTypeService.getCuisineTypeList();
        return Result.success(cuisineTypeList);
    }

}
